using TDAweb, TDAweb.Preprocessing, TDAweb.Analysis, TDAweb.TDA
using TidierFiles: list_files;
using DataFrames
using Images: mosaicview;
using Plots: heatmap, plot1 Analysis
1.1 Loading the images
In [1]:
In [1]:
files = list_files("images")
species = map(files) do file
split(file, "/")[2]
end
imgs = load_web.(files, blur = 2)
As = image_to_array.(imgs)
Xs = image_to_r2.(As, threshold = 0.1);In [1]:
df = DataFrame(File = files, Specie = species, Image = imgs);
grps = groupby(df, :Specie) |> collect;In [1]:
# for d ∈ groupby(df, :Specie)
# print("### $(d.Specie[1]) \n")
# mosaicview(d.Image, ncol = 3) |> display
# end;for i ∈ [1, 6]
plot(
heatmap(As[i]),
plot_scatter(Xs[i])
) |> display
end;